<div>博文列表</div>
<div class="top-button">
    选择商品分类：<select id="category">
    <option value="-1" >全部</option>
    <option value="0" <eq name="cid" value="0">selected</eq>>未分类</option>
    <foreach name="category" item="v">
        <option value="{$v.id}" <eq name="v.id" value="$cid">selected</eq>>{:str_repeat('— ',$v['level'])}{$v.name}</option>
    </foreach>
</select>
    <a href="{:U('Goods/add',array('cid'=>$cid))}" class="light">添加商品</a>
    <a href="{:U('Category/add')}">添加分类</a>
</div>
<div class="list full">
    <table>
        <tr><th class="t1">博文分类</th><th>博文名称</th> <th width="60">推荐</th><th width="120">操作</th></tr>
        <foreach name="blog.data" item="v">
            <tr><td>
                <empty name="v.category_id">
                    <a href="{:U('Blog/index','cid=0')}">未分类</a>
                    <else/>
                    <a href="{:U('Blog/index',array('cid'=>$v['category_id']))}">{$v.category_name}</a>
                </empty>
            </td>
                <td>{$v.name}</td><td>{$v.stock}</td>
                <td><a href="#" class="act-onsale" data-id="{$v.id}" data-status="{$v.on_sale}"><eq name="v.on_sale" value="yes">是<else/>否</eq></a></td>
                <td><a href="#" class="act-recommend" data-id="{$v.id}" data-status="{$v.recommend}"><eq name="v.recommend" value="yes">是<else/>否</eq></a></td><td>
                    <a href="{:U('Blog/edit',array('id'=>$v['id'],'cid'=>$v['category_id'],'p'=>$p))}">修改</a>　<a href="#" class="act-del" data-id="{$v.id}">删除</a></td></tr>
        </foreach>
    </table>
</div>
<div class="pagelist">{$goods.pagelist}</div>